import { isLogin } from '.';
export default function auth(component) {
    const mixin = {
        created: function () {
            if (!isLogin()) {
                this.$router.replace('/login')
            }
        }
    }
    return {
        ...component,
        mixins: [mixin],
    }
}